package com.fei.test;

public class HostProxy {

    private String hostname;

    private int port;

    private String userName;

    private String password;

    private int speed;

    private int live;

    private int successTime = 0;

    public HostProxy(String hostname, int port) {
        this.hostname = hostname;
        this.port = port;
    }

    public String getHostname() {
        return hostname;
    }

    public void setHostname(String hostname) {
        this.hostname = hostname;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public int getLive() {
        return live;
    }

    public void setLive(int live) {
        this.live = live;
    }

    public int getSuccessTime() {
        return successTime;
    }

    public void setSuccessTime(int successTime) {
        this.successTime = successTime;
    }

    @Override
    public boolean equals(Object obj) {

        HostProxy o = (HostProxy) obj;

        return this.hostname.equals(o.hostname);
    }

    @Override
    public String toString() {
        return this.hostname + ":" + this.port + ",speed:" + speed + ",live:"
                + live;
    }
}
